<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<title>来拍车App-抽奖介绍页面</title>
	<link rel="stylesheet" href="{:get_style_cdnurl()}app/css/common.css">
	<link rel="stylesheet" href="{:get_style_cdnurl()}app/css/lottery.css"></head>
<body>
	<div class="banner">
		<img src="{:get_style_cdnurl()}app/images/lottery1.jpg" alt="">
		<div class="activity-time">活动时间：{$starttime}-{$endtime}</div>
	</div>
	<div class="prize-winner">
		<div class="bd" style="width:100%;overflow:hidden">
			
		</div>
	</div>
	<div class="prize">
		<h2>确认购车即可抽取现金券直抵车款</h2>
		<div class="ticket">
			<img src="{:get_style_cdnurl()}app/images/lottery2.png" alt="">
		</div>
	</div>
	<div class="usage-rule">
		<h2>活动规则</h2>
		<p class="rule-detail">
			活动期间在来拍车成交车辆，确认购车后可抽取金额不等的现金券直抵车款！现金券金额包括100元、300元、500元、1000元、2000元，该现金券不设找零、不兑现金，且仅限该辆车结算时使用。活动时间：{$starttime}-{$endtime}。
		</p>
	</div>
<input type="hidden" value="1" id='count'>
<input type="hidden" name="activity_no" id="activity_no" value="{$activity_no}">
	<script type="text/javascript" src="{:get_style_cdnurl()}app/js/jquery.min.js"></script>
	<script type="text/javascript" src="{:get_style_cdnurl()}app/js/jquery.SuperSlide.2.1.1.js"></script>
	<script type="text/javascript">
	function get_data()
	{
		var activity_no = $("#activity_no").val();
		$.ajax({
		url: 'lpcapp/Raffle/get_dealer_phone_card/activity_no/'+activity_no,
		success: function(data) {
				 $('.tempWrap').remove();
				 var dataObj=eval("("+data+")");
				 if (dataObj.code == "200") {
			 		var alldata =eval("("+dataObj.data+")");
			 		var str = "<ul class='infoList'>"; 
			 		if (alldata.length >= 4 ) {
			 			$.each(alldata, function (n, value) {
						 	var phone =value.contact_mobile.substring(0,3)+"****"+value.contact_mobile.substring(7,11);
						 	str += "<li>"+phone+"获得"+Number(value.price)+"元现金券</li>";
						});
						str +="</ul>";
						// console.log(str);
						$('.bd').html(str);
						$(".prize-winner").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:2,interTime:50});		
			 		}else{
						$(".prize-winner").css("display","none");
					}
				 }else if (dataObj.code == "210") {
				 	$(".prize-winner").css("display","none");
				 }; 
			}
		});
	}
	setInterval("get_data()",120000);//2分钟一次执行
	// function refresh_page(){
	// 	history.go(0) ;
	// }
	get_data();	
	// $(document).ready(function(){
	// 	$(".prize-winner").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:2,interTime:50});
	// })	
	</script>
</body>
</html>